<template>
  <div class="base-select-user-user-item">
    <div class="base-select-user-user-item__checkbox">
      <el-checkbox :value="isSelected" @change="handleSelect">
      </el-checkbox>
    </div>
    <!-- <div class="base-select-user-user-item__head">
      <img :src="value.head || defaultHead" />
    </div> -->
    <div class="base-select-user-user-item__info">
      <div class="base-select-user-item__info-top">
        <div class="base-select-user-item__info-name">
          {{value.name}}
        </div>
      </div>
      <!-- <div class="base-select-user-item__info-bottom">
        <div class="base-select-user-item__info-phone">
          <span>{{value.cellPhone}}</span> 
        </div>
      </div> -->
    </div>
  </div>
</template>
<script>
import { getOssUrl } from '@src/util/assets'
const DefaultHead = getOssUrl('/avatar.png')
export default {
  props: {
    value: {
      type: Object,
      default: (() => {})
    },
    selected: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      defaultHead: DefaultHead,
    }
  },
  computed: {
    isSelected() {
      return this.selected
    }
  },
  methods: {
    handleSelect(val) {
      this.$emit('labelChange', this.value, val)
    }
  }
}

</script>
<style lang="scss">
.base-select-user-height-100-percent {
  height: auto;
  max-height: 100%;
}
.base-select-user-infinite-scroll-user{
  height: 100%;
  overflow-y: auto;
}
.base-select-user-user-item__checkbox {
  min-width: 16px;
  margin-right: 8px
}
.base-select-user-user-item__head {
  border-radius: 50%;
    width: 36px;
    height: 36px;
    min-width: 36px;
    margin-right: 12px;
}

.base-select-user-user-item__info {
  flex: 1;
  display: flex;
  flex-flow: column;
  max-width: calc(100% - 80px);
}
.base-select-user-item__info-top {
  display: flex;
}

.base-select-user-item__info-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.base-select-user-item__info-bottom {
  display: flex;
  .base-select-user-item__info-phone {
    color: #8C8C8C;
    font-size: 13px;
  }

}


</style>
